<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>我的首页</title>
    <link rel="stylesheet" href="stylesheets/style.css">
</head>
<body>
<header>
    <h1><%= title %></h1>
</header>
<main>
<nav>
    <% if (user) { %>
    <span><a href="/" title="我的文章">我的文章</a></span>
    <span><a href="/friends">所有动态</a></span>
    <span><a href="/post">发布</a></span>
    <span><a href="/logout">退出</a></span>
    <%  } else { %>
    <span><a href="/login" title="登录">登录</a></span>
    <span><a href="/reg" title="注册">注册</a></span>
    <% } %>
</nav>
<article>
    <% if (success) { %>
    <div style="color: #96B97D;"><%= success %></div>
    <% } %>
    <% if (error) { %>
    <div style="color: red;"><%= error %></div>
    <% } %>